home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / misc / TownMaze.lha / TownMaze / src.lzh / showmaze.c < prev    next >
C/C++ Source or Header  |  1991-08-04  |  706b  |  38 lines

  1. /*
  2. ** showmaze.c  Copyright 1991 Kent Paul Dolan,
  3. **             Mountain View, CA, USA 94039-0755
  4. **
  5. ** Written to satisfy an inquiry on USENet's rec.games.programmer newsgroup.
  6. ** May be freely used or modified in any non-commercial work.  Copyrighted
  7. ** only to prevent patenting by someone else.
  8. */
  9.  
  10. #include <stdio.h>
  11. #include "townmaze.h"
  12. #include "townproto.h"
  13.  
  14. #ifdef __STDC__
  15. void showmaze()
  16. #else
  17. int showmaze()
  18. #endif
  19. {
  20.   int i, j;
  21.  
  22. /*
  23. ** Draw the character version of the maze to stdout.
  24. */
  25.  
  26. #if PROGRESS
  27.   fprintf(stdout,"\n");
  28. #endif
  29.  
  30.   for (i = 0; i < mazeheight; i++)
  31.   {
  32.     for (j = 0; j < mazewidth; j++)
  33.       fprintf(stdout,"%c",cmaze[i][j]);
  34.     fprintf(stdout,"\n");
  35.   }
  36.   return;
  37. }
  38.